Problem Note 42504: Special characters in DBMS column names cause problems with the explicit pass-through option in the SAS® Enterprise Guide® 4.3 Query Builder
When querying DBMS tables in SAS Enterprise Guide 4.3 using the explicit pass-through option, errors can occur if the DBMS table contains column names with special characters.
Because SAS Enterprise Guide uses the option VALIDVARNAME=ANY by default, tables are opened with special characters in the variable names. If you use the explicit pass-through option, the query is generated with the variable in a name literal, which is invalid database syntax and generates a error that is similar to the following.
ERROR: CLI describe error: [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near 'VAR3#'. : [Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s) could not be prepared.
If the option VALIDVARNAME=V7 is used when SAS Enterprise Guide connects to the server, the special characters in the variable names are converted to underscores. However, submitting the pass-through query still generates an error, such as the following, because SAS cannot find the variable name in the table.
ERROR: CLI describe error: [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name 'VAR3_'. : [Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s) could not be prepared.
Currently, the workarounds are the following:
- Use a program node to submit code instead of the Query Builder.
- Do not use explicit pass-through to query the DBMS table.
- Rename the variables to remove the special characters before submitting the query.
Operating System and Release Information
SAS System | SAS Enterprise Guide | Microsoft® Windows® for x64 | 4.3 | 5.1 | 9.2 TS2M3 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Datacenter Edition | 4.3 | 5.1 | 9.2 TS2M3 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Enterprise Edition | 4.3 | 5.1 | 9.2 TS2M3 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Standard Edition | 4.3 | 5.1 | 9.2 TS2M3 | 9.3 TS1M0 |
Microsoft Windows Server 2003 for x64 | 4.3 | 5.1 | 9.2 TS2M3 | 9.3 TS1M0 |
Microsoft Windows Server 2008 | 4.3 | 5.1 | 9.2 TS2M3 | 9.3 TS1M0 |
Microsoft Windows Server 2008 for x64 | 4.3 | 5.1 | 9.2 TS2M3 | 9.3 TS1M0 |
Microsoft Windows XP Professional | 4.3 | 5.1 | 9.2 TS2M3 | 9.3 TS1M0 |
Windows 7 Enterprise 32 bit | 4.3 | 5.1 | 9.2 TS2M3 | 9.3 TS1M0 |
Windows 7 Enterprise x64 | 4.3 | 5.1 | 9.2 TS2M3 | 9.3 TS1M0 |
Windows 7 Home Premium 32 bit | 4.3 | 5.1 | 9.2 TS2M3 | 9.3 TS1M0 |
Windows 7 Home Premium x64 | 4.3 | 5.1 | 9.2 TS2M3 | 9.3 TS1M0 |
Windows 7 Professional 32 bit | 4.3 | 5.1 | 9.2 TS2M3 | 9.3 TS1M0 |
Windows 7 Professional x64 | 4.3 | 5.1 | 9.2 TS2M3 | 9.3 TS1M0 |
Windows 7 Ultimate 32 bit | 4.3 | 5.1 | 9.2 TS2M3 | 9.3 TS1M0 |
Windows 7 Ultimate x64 | 4.3 | 5.1 | 9.2 TS2M3 | 9.3 TS1M0 |
Windows Vista | 4.3 | 5.1 | 9.2 TS2M3 | 9.3 TS1M0 |
Windows Vista for x64 | 4.3 | 5.1 | 9.2 TS2M3 | 9.3 TS1M0 |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
Type: | Problem Note |
Priority: | high |
Date Modified: | 2011-03-29 14:43:06 |
Date Created: | 2011-02-24 10:20:18 |